package com.itwn.mapper;

import com.itwn.entity.Movie;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface MovieMapper {
    int deleteByPrimaryKey(Integer movieId);

    int insert(Movie record);

    Movie selectByPrimaryKey(Integer movieId);

    List<Movie> selectAll();

    int updateByPrimaryKey(Movie record);

    @Select("select movie_time from c_movie where movie_id=#{movieId}")
    String selectTimeByKey(Integer movieId);

    List<Movie> selcetMovieByPage(@Param("movieName") String movieName, @Param("movieId") String movieId);
}